﻿// Study0903.cpp : 此文件包含 "main" 函数。程序执行将在此处开始并结束。
// 第九章 群体数据 数组类 

#include <iostream>
#include "Array.h"
using namespace std;
ostream& operator <<(ostream& out,const Array<int> a)
{
    out << "{";
	for (int i = 0; i < a.getSize(); ++i)
	{
        out << a[i] << " ";
	}
    out << "}"<<endl;
    return out;
}
int main()
{
    const int n = 8;
    Array<int> a(n);
    for (int i = 0; i < n; ++i)
    {
        a[i] = i * 100 + i * 10 + i;
    }
    cout << a;
    Array<int> b=a;
    b.resize(4);
    cout << b;    
    Array<int>::reversal(b);
    cout << b;
    return 0;

}


